--- title: "错误票据" created: 2025-11-28 tags: - 算法 --- # 错误票据 ## 题目 [错误票据](https://www.acwing.com/problem/content/1206/) ![[image-e6eb1443.png]] ## 思路分析 ![[image-6404ad1e.png]] ## 代码实现 ```cpp #include using namespace std; const int N=100010; int st[N]; int main() { int n; cin>>n; int start=N,len=0; while(n--){ int x; while(cin>>x){ st[x]++; start=min(start,x); len++; } } int Br=0,Re=0; for(int i=start;i1) Re=i; } cout<